package com.sdy.healthcode.web.controller;

import com.sdy.common.model.Response;
import com.sdy.healthcode.biz.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author: 王越洋
 * @version: v1.0
 * @description: com.sdy.healthcode.web.controller
 * @date:2020/3/1
 */
@Slf4j
@Controller
@RequestMapping("/updUserType")
@Api(tags = "修改用户类型相关接口接口")
public class UserTypeController {
    private UserService userService;
    @PostMapping("/updTypeArayof")
    @ResponseBody
    @ApiOperation(value = "修改用户为一线人员")
    public Response updTypeArayof(HttpServletRequest request, Integer id){
        userService.updTypeArayof(id);
        return Response.success();
    }

    @PostMapping("/updTypeOrdinary")
    @ResponseBody
    @ApiOperation(value = "修改用户为普通人员")
    public Response updTypeOrdinary(HttpServletRequest request, Integer id){
        userService.updTypeOrdinary(id);
        return Response.success();
    }


}
